package utils;

import java.util.ArrayList;

public class ListaAlarmas {
	private static ArrayList stockAlarmas;
	
	static{
		stockAlarmas = new ArrayList();
		stockAlarmas.add("Alarma"+Alarmas.EMAIL);
		stockAlarmas.add("Alarma"+Alarmas.LUZ);
		stockAlarmas.add("Alarma"+Alarmas.SMS);
		stockAlarmas.add("Alarma"+Alarmas.SONORA);
		stockAlarmas.add("Alarma"+Alarmas.VOZ);
	}
	
	public static int getIndexAlarma(String nameAlarma){
		int index = 0;
		for(int i = 0; i<stockAlarmas.size();i++){
			if(stockAlarmas.get(i).toString().equals(nameAlarma) ){
				index = (i+1);
			}
		}
		return index;
	}
	
	public static String getNameAlarma(int indexAlarma){
		String name = "";
		name = stockAlarmas.get(indexAlarma).toString();
		return name;
	}
}
